Method, medium and apparatus effectively compressing and restoring edge position images

ABSTRACT

Provided are an apparatus and method for effectively compressing and restoring edge areas in an image. Therefore, by predicting values of pixels positioned at each directional edge, among pixels constructing a 2×2 block in a current image, using values of neighbor pixels of the pixels positioned at each directional edge, selecting an edge mode corresponding to a directional edge in which the difference between the predicted values and actual values of the pixels is a minimum, and outputting edge mode data indicating the edge mode instead of the predicted values corresponding to the edge mode, it is possible to effectively compress edge areas in which little similarity exists between pixel values, and accordingly improve a compression rate of edge areas.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of Korean Patent Application No.10-2007-0006308, filed on Jan. 19, 2007, in the Korean IntellectualProperty Office, the disclosure of which is incorporated herein in itsentirety by reference.

BACKGROUND

1. Field

One or more embodiments of the present invention relate to an apparatus,method and medium compressing and restoring images, and moreparticularly, to an apparatus, method and medium effectively compressingand restoring edge areas in an image.

2. Description of the Related Art

Existing image compression techniques, such as H.264, JPEG-LS, and theJPEG standards, utilize a basic principle of removing similaritiesbetween pixel values constructing an image. The basic principle can beapplied to a variety of images, however it cannot be applied to parts ofnatural images or synthetic images in which little similarity existsbetween pixel values. In particular, an example of an image in whichlittle similarity exists between pixel values is an edge area of animage. The edge refers to an area whose pixel values have significantdifferences with respect to values of neighboring pixels.

FIG. 1 illustrates a variety of areas in an image.

Referring to FIG. 1, area 0 demonstrates little change between values ofadjacent pixels, while the remaining areas 1, 2, 3, and 4 are areas inwhich changes between values of adjacent pixels are significant. Areas 1through 4 are representative edge areas. If existing image compressionmethods are applied to the edge areas, compression efficiency andpicture quality of restored images deteriorate significantly becausesimilarities between pixel values cannot be utilized.

SUMMARY

One or more embodiments of the present invention provide an apparatusand method effectively compressing and restoring edge areas.

One or more embodiments of the present invention also provide anapparatus and method effectively compressing and restoring a variety ofimages other than edge areas.

One or more embodiments of the present invention also provide acomputer-readable recording medium having embodied thereon a program forexecuting methods that effectively compress and restore edge areas.

Additional aspects and/or advantages will be set forth in part in thedescription which follows and, in part, will be apparent from thedescription, or may be learned by practice of the invention.

According to an aspect of the present invention, there is provided apixel value prediction method including: (a) determining pixelspositioned at a predetermined directional edge, among pixelsconstructing a block having a predetermined size in a current image; (b)determining neighbor pixels positioned in each of two areas divided bythe predetermined directional edge; and (c) predicting values of thepixels positioned at the predetermined directional edge, using values ofthe determined neighbor pixels.

According to another aspect of the present invention, there is provideda computer-readable recording medium having embodied thereon a programfor executing the pixel value prediction method.

According to another aspect of the present invention, there is provideda first image compression method including: (a) predicting values ofpixels positioned at a predetermined directional edge among pixelsconstructing a block having a predetermined size in a current image,using values of neighbor pixels of the pixels positioned at thepredetermined directional edge; (b) repeating operation (a) with respectto each remaining directional edge except for the predetermineddirectional edge, among a plurality of directional edges; (c) selectingan edge mode in which the difference between the values predicted inoperations (a) and (b) and actual values of the pixels positioned at thepredetermined directional edge is a minimum; (d) outputting edge modedata indicating the selected edge mode, instead of the predicted valuescorresponding to the selected edge mode, thereby compressing the valuesof the pixels positioned at the predetermined directional edge.

According to another aspect of the present invention, there is provideda computer-readable recording medium having embodied thereon a programfor executing the first image compression method.

According to another aspect of the present invention, there is provideda first image compression apparatus including: a first prediction unitpredicting values of pixels positioned at a first directional edge,using values of neighbor pixels of the pixels positioned at the firstdirectional edge, among pixels constructing a block having apredetermined size in a current image; a second prediction unitpredicting values of pixels positioned at a second directional edge,using values of neighbor pixels of the pixels positioned at the seconddirectional edge, among the pixels constructing the block having thepredetermined size in the current image; a third prediction unitpredicting values of pixels positioned at a third directional edge,using values of neighbor pixels of the pixels positioned at the thirddirectional edge, among the pixels constructing the block having thepredetermined size in the current image; a fourth prediction unitpredicting values of pixels positioned at a fourth directional edge,using values of neighbor pixels of the pixels positioned at the fourthdirectional edge, among the pixels constructing the block having thepredetermined size in the current image; an edge mode selecting unitselecting an edge mode corresponding to a directional edge in which thedifference between the values of the pixels predicted by the first,second, third, and fourth prediction units and actual values of thepixels is a minimum; and a compression unit outputting edge mode dataindicating the selected edge mode, instead of the predicted valuescorresponding to the selected edge mode, thereby compressing the valuesof the pixels.

According to another aspect of the present invention, there is provideda second image compression method including: (a) compressing values ofpixels constructing a block having a predetermined size in a currentimage, according to a plurality of predetermined image compressionmethods; (b) predicting values of pixels positioned at a predetermineddirectional edge, among the pixels constructing the block, using valuesof neighbor pixels of the pixels positioned at the predetermineddirectional edge, thereby compressing the values of the pixelspositioned at the predetermined directional edge; (c) selecting a modefrom among a plurality of modes corresponding to the plurality ofpredetermined image compression methods and an image compression methodused in operation (b), on the basis of the results compressed inoperations (a) and (b); and (d) generating a bit stream packet includingmode data indicating the selected mode and compressed data correspondingto the selected mode.

According to another aspect of the present invention, there is provideda computer-readable recording medium having embodied thereon a programfor executing the second image compression method.

According to another aspect of the present invention, there is provideda second image compression apparatus including: a first compression unitcompressing values of pixels constructing a block having a predeterminedsize in a current image, according to a plurality of image compressionmethods; a second compression unit predicting values of pixelspositioned at a predetermined directional edge, among the pixelsconstructing the block, using values of neighbor pixels of the pixelspositioned at the predetermined directional edge, thereby compressingthe values of the pixels positioned at the predetermined directionaledge; an edge mode selecting unit selecting a mode from among aplurality of modes corresponding to the predetermined image compressionmethods and an image compression method used by the second compressionunit, on the basis of the results compressed by the first compressionunit and the second compression unit; and a bit packing unit generatinga bit stream packet including mode data indicating the selected mode andcompressed data corresponding to the selected mode.

According to another aspect of the present invention, there is provideda first image restoring method including: (a) recognizing an edge modeamong a plurality of edge modes; and (b) predicting values of pixelspositioned at a predetermined directional edge corresponding to therecognized edge mode, among pixels constructing a block having apredetermined size in a current image, using values of neighbor pixelsof the pixels positioned at the predetermined directional edge.

According to another aspect of the present invention, there is provideda computer-readable recording medium having embodied thereon a programfor executing the first image restoring method.

According to another aspect of the present invention, there is provideda first image restoring apparatus including: a mode recognition unitrecognizing an edge mode among a plurality of edge modes; and aprediction unit predicting values of pixels positioned at apredetermined directional edge corresponding to the recognized edgemode, among pixels constructing a block having a predetermined size in acurrent image, using values of neighbor pixels of the pixels positionedat the predetermined directional edge.

According to another aspect of the present invention, there is provideda second image restoring method including: (a) extracting mode data andcompressed data of a block having a predetermined size in a currentimage, from a bit stream packet; (b) recognizing a mode corresponding toan image compression method of a plurality of image compression methods,from the mode data; and (c) predicting values of pixels positioned at adirectional edge indicated by the recognized mode, among pixelsconstructing the block, using values of neighbor pixels of the pixelspositioned at the directional edge, according to the recognized mode,thereby restoring the values of the pixels positioned at the directionaledge.

According to another aspect of the present invention, there is provideda computer-readable recording medium having embodied thereon a programfor executing the second image restoring method.

According to another aspect of the present invention, there is provideda second image restoring apparatus including: an extracting unitextracting mode data and compressed data of a block having apredetermined size in a current image, from a bit stream packet; a moderecognition unit recognizing a mode corresponding an image compressionmethod of a plurality of image compression methods, from the mode data;and a prediction unit predicting values of pixels positioned at adirectional edge indicated by the recognized mode, among pixelsconstructing the block, using values of neighbor pixels of the pixelspositioned at the directional edge, according to the recognized mode,thereby restoring the values of the pixels positioned at the directionaledge.

BRIEF DESCRIPTION OF THE DRAWINGS

These and/or other aspects and advantages will become apparent and morereadily appreciated from the following description of the embodiments,taken in conjunction with the accompanying drawings of which:

FIG. 1 illustrates a variety of areas in an image;

FIG. 2 is a block diagram of a Liquid Crystal Display DynamicCapacitance Compensation (LCD DCC) apparatus, according to an embodimentof the present invention;

FIG. 3 illustrates an image compression apparatus illustrated in FIG. 2;

FIG. 4 illustrates four directional edges such as those used by a secondcompression unit illustrated in FIG. 3;

FIG. 5 illustrates the second compression unit such as illustrated inFIG. 3;

FIG. 6 explains a pixel value calculation method such as performed by afirst edge prediction unit illustrated in FIG. 5;

FIG. 7 explains a pixel value calculation method such as performed by asecond edge prediction unit illustrated in FIG. 5;

FIG. 8 explains a pixel value calculation method such as performed by athird edge prediction unit illustrated in FIG. 5;

FIG. 9 explains a pixel value calculation method such as performed by afourth edge prediction unit illustrated in FIG. 5;

FIG. 10 illustrates an exemplary bit stream packet such as generated bya bit packing unit illustrated in FIG. 3;

FIG. 11 illustrates an image restoring apparatus such as illustrated inFIG. 2;

FIG. 12 illustrates a second restoring unit such as illustrated in FIG.11;

FIG. 13 explains a process of performing truncation and addition of 8bits of a pixel value according to an edge method, according to anembodiment of the present invention;

FIG. 14 illustrates a pixel value prediction method, according to anembodiment of the present invention;

FIG. 15 illustrates an image compression method, according to anembodiment of the present invention;

FIG. 16 illustrates an image compression method such as thatcorresponding to operation 153 illustrated in FIG. 15;

FIG. 17 illustrates an image restoring method, according to anembodiment of the present invention; and

FIG. 18 illustrates an image restoring method such as that correspondingto operation 174 illustrated in FIG. 17.

DETAILED DESCRIPTION OF EMBODIMENTS

Reference will now be made in detail to embodiments, examples of whichare illustrated in the accompanying drawings, wherein like referencenumerals refer to the like elements throughout. Embodiments aredescribed below to explain the present invention by referring to thefigures. In particular, it may be understood by one of ordinary skill inthe art that embodiments described below are applied to a RGB colorspace, but may also be applied to spaces other than the RGB color space,such as a YCbCr color space.

FIG. 2 illustrates a Liquid Crystal Display Dynamic CapacitanceCompensation (LCD DCC) apparatus, according to an embodiment of thepresent invention.

Referring to FIG. 2, the LCD DCC apparatus may include, for example, animage compression apparatus 21, a memory 22, an image restoringapparatus 23, and a Lookup Table (LUT) module 24. The LCD DCC apparatustypically applies a voltage higher than a voltage required for drivingpixels of a Thin Film Transistor (TFT)-LCD panel to the pixels, in orderto improve a response time of the TFT-LCD panel.

The image compression apparatus 21 may compress a current imageselectively using one of a variety of image compression methods such asa Differential Pulse Code Modulation (DPCM) method, a Pulse CodeModulation (PCM) method, a transformation method, or an edge method.

The memory 22 generally receives data compressed by the data compressionapparatus 21, and stores the data therein. Accordingly, when a currentimage is received, compressed data corresponding to the previous imagemay be stored in the memory 22.

The image restoring apparatus 23 may restore previous images stored inthe memory 22, selectively using one of a variety of image compressionmethods, such as the DPCM method, the transformation method, the PCMmethod, or the edge method.

The LUT module 24 may predict a voltage value required for achieving atarget response time of the TFT-LCD panel, with reference to a lookuptable stored therein. In more detail, the LUT module 24 may obtainvoltage value information corresponding to a difference between thebrightness value of a pixel of a current input image and the brightnessvalue of the corresponding pixel of the previous image restored by thedata restoring apparatus 23, from the lookup table, and may predict avoltage value required for achieving the target response time of theTFT-LCD panel, using the voltage value information and the targetresponse time of the TFT-LCD panel.

As described above, in order to predict a voltage value required forachieving a target response time of a TFT-LCD panel, previous imagesusually have to be stored in the memory 22. However, the memory 22 has afixed capacity. The image compression apparatus 21 and the imagerestoring apparatus 23, which will be described in greater detail below,may accurately obtain a picture-based Constant Bit Rate (CBR) requiredby a LCD DCC apparatus, while improving compression efficiency of edgeareas and picture-quality of restored images.

Also, the image compression apparatus 21 and the image restoringapparatus 24 may be widely applied to a variety of image compressionfields requiring low complexity and subjective lossless picture-quality,as well as to LCD DCC apparatuses as illustrated in FIG. 2. For example,the image compression apparatus 21 and the image restoring apparatus 24may be applied to image compression for Display Driver ICs (DDIs),reference picture compression for video encoder/decoder systems, etc.

FIG. 3 illustrates the image compression apparatus 21 such asillustrated in FIG. 2.

Referring to FIG. 3, the image compression apparatus 21 may include, forexample, a splitter 31, a first compression unit 32, a secondcompression unit 33, a mode selection unit 34, a restoring unit 35, anda bit packing unit 36. The image compression apparatus 21 may furtherinclude additional components such as a device for performingentropy-encoding to further improve an image compression rate, otherthan, or in addition to, the above-mentioned components.

The splitter 31 generally receives an image (hereinafter, referred to asa “current image”), divides the current image into a plurality of 2×2blocks, each 2×2 block consisting of a set of four pixels, and outputseach 2×2 block to the first compression unit 32 and the secondcompression unit 33. Here, the current image may be referred to usingdifferent terms such as a current picture, a current frame, etc.

In an embodiment, the 2×2 block consists of four pixel values for eachcolor component of the current image. Since a pixel value correspondingto a color component is 8 bits, the number of pixels included in a 2×2block is 4, and color components of an image are R, G, and B components,the 2×2 block corresponds to 96 bits (=8×4×3). Specifically, each 2×2block output to the first compression unit 32 and the second compressionunit 33 may be referred to as a “current block.”.

The first compression unit 32 may compress the four pixel valuesconstructing the current block divided by the splitter 31, according toany of the DPCM method, the PCM method, and the transformation method,for example. In more detail, the first compression unit 32 may shift thefour pixel values constructing the current block and four pixel valuesconstructing a reference block corresponding to the current block, bythe number of bits corresponding to each mode in a direction to theright, for each of a plurality of modes based on the DPCM method. Thefirst compression unit 32 may predict differences between the shiftedfour pixel values of the current block and the shifted pixel values ofthe reference block, thereby compressing the four pixel valuesconstructing the current block. Also, the first compression unit 32 maytruncate a part of the four pixel values constructing the current block,thereby compressing the four pixel values constructing the currentblock, according to the PCM method. Also, the first compression unit 32may compress the four pixel values constructing the current block usingDCT transformation, etc., according to the transformation method. Ingeneral, the reference block may be the previous block of the currentblock; however, it may equally be a different neighboring block of thecurrent block.

The DPCM and PCM methods are described in detail in Korean PatentApplications Nos. 2006-0056071 and 2006-0068896, and the transformationmethod is described in detail in the existing Joint Photographic ExpertsGroup (JPEG) standard. In an embodiment, the term “PCM method” is usedto represent a technical concept that is opposite to the above-describedDPCM method, and may be different from a general PCM method ofconverting analog signals into digital signals. Specifically, the PCMmethod can be referred to using a different term, such as a truncationcompression method, etc. The edge method is first proposed in one ormore embodiments of the present invention, and will be described in moredetail below.

The second compression unit 33 may predict values of two pixels locatedat each directional edge among the four pixels constructing the currentblock divided by the splitter 31 using values of neighboring pixels ofthe two pixels located at each directional edge, for each of fourdirectional edges, and may truncate a part of the remaining pixel valueswhich are not predicted, thereby compressing the four pixel valuesconstructing the current block. In the current embodiment, theneighboring pixels may include at least two or more pixels among thefour pixels constructing the current block and pixels constructing aneighboring block of the current block.

FIG. 4 illustrates four directional edges used by the second compressionunit 33 illustrated in FIG. 3.

Referring to FIG. 4, in an embodiment, four directional edges, e.g.,lower-right, lower-left, vertical, and horizontal directional edges, maybe used. As illustrated in FIG. 4, at each directional edge, pixel valueprediction may be performed on two pixels indicated with hatching. Whitepixels and pixels denoted by dots are neighboring pixels of two pixelsthat are positioned at each directional edge. Specifically, the whitepixels are pixels disposed outside a current block, and the dottedpixels are pixels inside the current block. In an embodiment, bytransferring only values of the white pixels to the image restoringapparatus 23 without transferring values of the pixels indicated withhatching in the current block to the image restoring apparatus 23,values of the pixels constructing the current block may be compressed.

FIG. 5 illustrates the second compression unit 33 such as illustrated inFIG. 3.

Referring to FIG. 5, the second compression unit 33 may include, forexample, a first edge prediction unit 51, a second edge prediction unit52, a third edge prediction unit 53, a fourth edge prediction unit 54,an edge mode selection unit 55, and an edge compression unit 56.

The first edge prediction unit 51 may predict values of two pixelspositioned at a lower-right directional edge among the four pixelsconstructing the current block divided by the splitter 31, using valuesof neighboring pixels of the two pixels positioned at the lower-rightdirectional edge. In more detail, the first edge prediction unit 51 maypredict values of two pixels positioned at a lower-right directionaledge among the four pixels constructing the current block, using anaverage value of values of neighboring pixels of one of two areasdivided by the lower-right directional edge and of values of neighboringpixels of the other of the two areas.

FIG. 6 explains a pixel value calculation method such as performed bythe first edge prediction unit 51 illustrated in FIG. 5.

Referring to FIG. 6, the first edge prediction unit 51 may predict avalue of a current pixel P0, which is the upper pixel of two pixels P0and P3 positioned at a lower-right directional edge, using an averagevalue of values of the pixel P1 to the right of, a pixel P2 below, apixel N1 to the left of, and a pixel N3 above the current pixel P0, eachof which are neighboring pixels of the current pixel P0, according toEquation 1 below for example, for each color component of a currentimage.P0=(P1+P2+N1+N3+2)/4  Equation 1

In Equation 1, the value “2” added to the value “P1+P2+N1+N3” may beused to correct the average value of “P1+P2+N1+N3” in order to improvethe picture-quality of a restored image, and accordingly, the value “2”may be replaced by a different value or may be omitted. This may beapplied in the same way to one or more of the following embodiments.

Also, the first edge prediction unit 51 may predict a value of thecurrent pixel P0, which is the upper pixel of the two pixels P0 and P3positioned at the lower-right directional edge, by summing a value ofthe pixel N2 to the upper-left of the current pixel P0, and a gradientvalue of the pixel P3 to the lower-right of the current pixel P0 withrespect to the current pixel P0, according to Equation 2 below forexample, for each color component of the current image. Also, the firstedge prediction unit 51 may select a neighbor mode corresponding toneighboring pixels used to obtain a predicted value of the current pixelP0 having a smaller difference from the actual value of the currentpixel P0 among the predicted values of the current pixel P0, from amongtwo neighbor modes (corresponding to Equations 1 and 2) in which twopatterns of neighboring pixels are respectively used, as describedabove, and may output neighbor mode data corresponding to the selectedneighbor mode.P0=N2+delta1, delta1=(((N1+N3+1)/2−N2)+1)/2  Equation 2

Also, the first edge prediction unit 51 may predict a value of a currentpixel P3, which is the lower of the two pixels P0 and P3 positioned atthe lower-right directional edge, using an average value of values ofthe pixel P1 above the current pixel P3, the pixel P2 to the left of thecurrent pixel P3, the pixel N1 to the left of the pixel P0 to theupper-left of the current pixel P3, and the pixel N3 above the pixel P0to the upper-left of the current pixel P3, each of which are neighboringpixels of the current pixel P3, according to Equation 3 below forexample, for each color component of the current image.P3=(P1+P2+N1+N3+2)/4  Equation 3

Also, the first edge prediction unit 51 may predict the current pixelP3, which is the lower of the two pixels P0 and P3 positioned at thelower-right directional edge, by obtaining an average value of values ofthe pixel P1 above the current pixel P3, and the pixel P2 to the left ofthe current pixel P3, each of which are neighboring pixels of thecurrent pixel P3, and summing the average value and a gradient value ofthe upper-left pixel P0 with respect to the current pixel P3 withrespect to the current pixel P3, according to Equation 4, for each colorcomponent of the current image. Also, the first edge prediction unit 51may select a neighbor mode corresponding to neighboring pixels used toobtain a predicted value of the current pixel P3 having a smallerdifference from the actual value of the current pixel P3 among thepredicted values of the current pixel P3, from among two neighbor modes(corresponding to Equations 3 and 4) in which two patterns ofneighboring pixels are respectively used, as described above, and mayoutput neighbor mode data corresponding to the selected neighbor mode.P3=(P1+P2+1)/2+delta2, delta2=(P2−N1)/8  Equation 4

The second edge predictor 52 may predict values of two pixels positionedat a lower-left directional edge among the four pixels constructing thecurrent block divided by the splitter 31, using values of neighboringpixels of the two pixels positioned at the lower-left directional edge.In more detail, the second edge prediction unit 52 may predict values oftwo pixels positioned at a lower-left directional edge among four pixelsconstructing the current block, using an average value of values ofneighboring pixels of one of two areas divided by the lower-leftdirectional edge, and of values of neighboring pixels of the other ofthe two areas.

FIG. 7 explains a pixel value calculating method such as performed bythe second edge prediction unit 52 illustrated in FIG. 4.

Referring to FIG. 7, the second edge prediction unit 52 may predict avalue of a current pixel P1, which is the upper pixel of two pixels P1and P2 positioned at a lower-left directional edge, using an averagevalue of pixels P0 and P3 to the left of and below the current pixel P1,each of which are neighboring pixels of the current pixel P1, accordingto Equation 5 below, for example, for each color component of thecurrent image.P1=(P0+P3+1)/2  Equation 5

Also, the second edge prediction unit 52 may predict a value of thecurrent pixel P1, which is the upper pixel of the two pixels P1 and P2positioned at the lower-left directional edge, using an average value ofvalues of the pixels N4 and P3 located above and below the current pixelP1, each of which are neighboring pixels of the current pixel P1,according to Equation 6 below, for example, for each color component ofthe current image. Also, the second edge prediction unit 52 may select aneighbor mode corresponding to neighboring pixels used to obtain apredicted value of the current pixel P1 having a smaller difference fromthe actual value of the current pixel P1 among the predicted values ofthe current pixel P1, from among two neighbor modes (corresponding toEquations 5 and 6) in which two patterns of neighboring pixels may berespectively used, as described above, and may output neighbor mode datacorresponding to the neighbor mode.P1=(N4+P3+1)/2  Equation 6

Also, the second edge prediction unit 52 may predict a value of acurrent pixel P2, which is the lower of the two pixels P1 and P2positioned at the lower-left directional edge, using an average value ofthe pixels P0 and P3 above and to the right of the current pixel P2,each of which are neighboring pixels of the current pixel P2, accordingto Equation 7 below for example, for each color component of the currentimage.P2=(P0+P3+1)/2  Equation 7

Also, the second edge prediction unit 52 may predict a value of thecurrent pixel P2, which is the lower of the two pixels P1 and P2positioned at the lower-left directional edge, using an average value ofthe pixels N0 and P3 to the left and right of the current pixel P2, eachof which are neighboring pixels of the current pixel P2, according toEquation 8 below for example, for each color component of the currentimage. Also, the second edge prediction unit 52 may select a neighbormode corresponding to neighboring pixels used to obtain a predictedvalue of the current pixel P2 having a smaller difference from theactual value of the current pixel P2 among the predicted values of thecurrent pixel P1, from among two neighbor modes (corresponding toEquation 7 above and Equation 8 below) in which two patterns ofneighboring pixels are respectively used, as described above, and mayoutput neighbor mode data corresponding to the neighbor mode.P2=(N0+P3+1)/2  Equation 8

The third edge prediction unit 33 may predict values of two pixelspositioned at a vertical directional edge, among the four pixelsconstructing the current block divided by the splitter 31, using valuesof neighboring pixels of the two pixels positioned at the verticaldirectional edge. In more detail, the third edge prediction unit 53 maypredict values of two pixels positioned at a vertical directional edgeamong the four pixels constructing the current block, using an averagevalue of values of neighboring pixels of one of two areas divided by thevertical directional edge, and of values of neighboring pixels of theother of the two areas.

FIG. 8 explains a pixel value calculating method such as performed bythe third edge prediction unit 53 illustrated in FIG. 4.

Referring to FIG. 8, the third edge prediction unit 53 may predict avalue of a current pixel P0, which is the upper pixel of two pixels P0and P2 positioned at a vertical direction edge, using an average valueof values of the pixels N1 and P1 to the left and right of the currentpixel P0, each of which are neighboring pixels of the current pixel P0,according to Equation 9 below for example, for each color component ofthe current image.P0=(N1+P1+1)/2  Equation 9

Also, the third edge prediction unit 53 may predict a value of thecurrent pixel P0, which is the upper pixel of the two pixels P0 and P2positioned at the vertical directional edge, by obtaining an averagevalue of pixels N1 and P1 to the left and right of the current pixel P0,each of which are neighboring pixels of the current pixel P0, andsumming the average value and a gradient value in a horizontal directionat the pixel N3 above the current pixel P0, according to Equation 10below for example, for each color component of the current image. Also,the third edge prediction unit 53 may select a neighbor modecorresponding to neighboring pixels used to obtain a predicted value ofthe current pixel P0 having a smaller difference from the actual valueof the current pixel P0 among the predicted values of the current pixelP0, from among two neighbor modes (corresponding to Equation 9 above andEquation 10 below) in which two patterns of neighboring pixels arerespectively used, as described above, and may output neighbor mode datacorresponding to the neighbor mode.P0=(N1+P1+1)/2+delta1, delta1=N3−(N2+N4+1)/2  Equation 10

Also, the third edge prediction unit 53 may predict a value of a currentpixel P2, which is below the two pixels P0 and P1 positioned at thevertical directional edge, using an average value of the pixels N0 andP3 to the left and right of the current pixel P2, each of which areneighboring pixels of the current pixel P2, according to Equation 11below for example, for each color component of the current image.P2=(N0+P3+1)/2  Equation 11

Also, the third edge prediction unit 53 may predict a value of thecurrent pixel P2, which is the lower of the two pixels P0 and P2positioned at the vertical directional edge, by obtaining an averagevalue of values of the left and right pixels N0 and P3 of the currentpixel P2, each of which are neighboring pixels of the current pixel P2,and summing the average value and a gradient value in a horizontaldirection at the pixel N3 above the pixel P0 above the current pixel P2,according to Equation 12 below for example, for each color component ofthe current image. Also, the third edge prediction unit 53 may select aneighbor mode corresponding to neighboring pixels used to obtain apredicted value of the current pixel P2 having a smaller difference fromthe actual value of the current pixel P2 among the predicted values ofthe current pixel P2, from among two neighbor modes (corresponding toEquation 11 above and Equation 12 below) in which two patterns ofneighboring pixels are respectively used, as described above, and mayoutput neighbor mode data corresponding to the neighbor mode.P2=(N0+P3+1)/2+delta2  Equation 12

In Equation 12, if P0=(N1+P1+1)/2+delta1, “delta2” may correspond to“delta1” in Equation 10, and if P0=(N1+P1+1)/2, “delta2” may correspondto “−delta1”.

The fourth edge prediction unit 54 may predict values of two pixelspositioned at a horizontal directional edge, among the four pixelsconstructing the current block divided by the splitter 31, usingneighboring pixels of the two pixels positioned at the horizontaldirectional edge. In more detail, the fourth edge prediction unit 54 maypredict values of two pixels positioned at a horizontal directional edgeamong the four pixels constructing the current block, using an averagevalue of values of neighboring pixels of one of two areas divided by thehorizontal directional edge, and of values of neighboring pixels of theother of the two areas.

FIG. 9 explains a pixel value calculating method such as performed bythe fourth edge prediction unit 54 illustrated in FIG. 4.

Referring to FIG. 9, the fourth edge prediction unit 54 may predict avalue of a current pixel P0, which is the left-most pixel of the twopixels P0 and P1 positioned at a horizontal directional edge, using anaverage value of values of the pixels N3 and P2 above and below thecurrent pixel P0, each of which are neighboring pixels of the currentpixel P0, according to Equation 13 below for example, for each colorcomponent of the current image.P0=(N3+P2+1)/2  Equation 13

Also, the fourth edge prediction unit 54 may predict a value of thecurrent pixel P0, which is the left-most pixel of the two pixels P0 andP1 positioned at the horizontal directional edge, by obtaining anaverage value of values of the pixels N3 and P2 above and below thecurrent pixel P0, each of which are neighboring pixels of the currentpixel P0, and summing the average value and a gradient value in avertical direction at the pixel N1 to the left of the current pixel P0,according to Equation 14 below for example, for each color component ofthe current image. Also, the fourth edge prediction unit 54 may select aneighbor mode corresponding to neighboring pixels used to obtain apredicted value of the current pixel P0 having a smaller difference fromthe actual value of the current pixel P0 among the predicted values ofthe current pixel P0, from among two neighbor modes (corresponding toEquation 13 above and Equation 14 below) in which two patterns ofneighboring pixels are respectively used, as described above, and mayoutput neighbor mode data corresponding to the neighbor mode.P0=(N3+P2+1)/2+delta1, delta1=N1−(N2+N0+1)/2  Equation 14

Also, the fourth edge prediction unit 54 may predict a value of acurrent pixel P1, which is the right-most pixel of the two pixels P0 andP1 positioned at the horizontal directional edge, using an average valueof values of the pixels N4 and P3 above and below the current pixel P1,each of which are neighboring pixels of the current pixel P1, accordingto Equation 15 below for example, for each color component of thecurrent image.P1=(N4+P3+1)/2  Equation 15

Also, the fourth edge prediction unit 54 may predict a value of thecurrent pixel P1, which is the right-most pixel of the two pixels P0 andP1 positioned at the horizontal directional edge, by obtaining anaverage value of values of the pixels N4 and P3 above and below thecurrent pixel P1, each of which are neighboring values of the currentpixel P1, and summing the average value and a gradient value in avertical direction at the pixel N1 to the left of the pixel P0 to theleft of the current pixel P1, according to Equation 16 below forexample, for each color component of the current image. Also, the fourthedge prediction unit 54 may select a neighbor mode corresponding toneighboring pixels used to obtain a predicted value of the current pixelP1 having a smaller difference from the actual value of the currentpixel P1 among the predicted values of the current pixel P1, from amongtwo neighbor modes (corresponding to Equation 15 above and Equation 16below) in which two patterns of neighboring pixels are respectivelyused, as described above, and may output neighbor mode datacorresponding to the neighbor mode.P1=(N4+P3+1)/2+delta2  Equation 16

In Equation 16, if P0=(N1+P1+1)/2+delta1, “delta2” may correspond to“delta1” in Equation 10, and if P0=(N1+P1+1)/2, “delta2” may correspondto “−delta1”.

The edge mode selection unit 55 may select an edge mode corresponding toan edge direction in which the predicted values (which are predictedrespectively by the first edge prediction unit 51, the second edgeprediction unit 52, the third edge prediction unit 53, and the fourthedge prediction unit 54) of the four pixels constructing the currentblock have the smallest differences from original values of the fourpixels, from among edge modes respectively corresponding to the fourdirectional edges. Referring to FIGS. 3 and 5, in order to preciselyselect an edge mode, the first edge prediction unit 51, the second edgeprediction unit 52, the third edge prediction unit 53, and the fourthedge prediction unit 54 may predict values of pixels, using valuesrestored by the restoring unit 35, without using actual values of theneighboring pixels of the pixels.

The edge compression unit 56 may output edge mode data indicating theedge mode selected by the edge mode selection unit 55, and neighbor modedata indicating a neighbor mode (corresponding to the edge mode)selected by one among the first edge prediction unit 51, the second edgeprediction unit 52, the third edge prediction unit 53, and the fourthedge prediction unit 54, instead of the predicted values of the twopixels, thereby compressing values of the four pixels constructing thecurrent block. Also, the edge compression unit 56 may truncate a part ofvalues of pixels whose values have not been predicted, according to theedge mode selected by the edge mode selection unit 55. In the edgemethod according to an embodiment, values of R and B componentstransferred to the image restoring apparatus 23 (see FIG. 2) are eachcomprised of 4 bits, and a value of a G component transferred to theimage restoring apparatus 23 is comprised of 5 bits. That is, the edgecompression unit 56 may truncate 4 bits of R component values of pixelswhose values have not been predicted, 3 bits of G component values ofthe pixels, and 4 bits of B component values of the pixels, according tothe edge mode selected by the edge mode selection unit 55.

The mode selection unit 34 may select a mode indicating a compressionmethod, from among a plurality of modes corresponding to, for example,the DPCM method, the PCM method, the transformation method, and the edgemethod, on the basis of the results which are compressed by the firstcompression unit 32 and the second compression unit 33. In more detail,the mode selection unit 34 may calculate differences between values ofthe four pixels constructing the current block, which are restoredaccording to the DPCM method, the PCM method, and the transformationmethod used by the restoring unit 35, and the edge method used by thesecond compression unit 33, and actual values of the four pixelsconstructing the current block divided by the splitter 31, and mayselect a mode indicating an image compression method in which thedifference is a minimum, from among the plurality of modes correspondingto the DPCM method, the PCM method, the transformation method, and theedge method. Specifically, in an embodiment, since differencescorresponding to R, G, and B components exist separately, the modeselection unit 34 may select a mode in which a sum of differencescorresponding to the R, G, and B components is minimum, from among theplurality of modes.

The restoring unit 35 may restore values of the four pixels constructingthe current block using data compressed by the first compression unit32, according to, for example, the DPCM method, the PCM method, and thetransformation method. Also, the restoring unit 35 may extractcompressed values A and B of two pixels of the four pixels constructingthe current block from the data compressed by the second compressionunit 33, may add a predetermined binary value to the compressed values Aand B of the two pixels, and may predict values of two pixels positionedat a directional edge corresponding to the edge mode selected by theedge mode selection unit 55, using values of neighboring pixels of thetwo pixels positioned at the directional edge, thereby restoring valuesof the four pixels constructing the current block. A more detaileddescription of the restoring unit 35 is omitted herein, and detailstherefor will be given in the following description related to theoperations of a first restoring unit 113 and a second restoring unit 114illustrated in FIG. 11.

Returning to FIGS. 2 and 3, the bit packing unit 36 may generate modedata indicating the mode selected by the mode selection unit 34, and abit stream packet including compressed data corresponding to the mode,and output the mode data and the bit stream packet to the memory 22. Inparticular, if the mode selected by the mode selection unit 34corresponds to the edge method, the compressed data typically includesedge mode data indicating a edge mode selected by the second compressionunit 33, reference data representing a neighbor mode selected by thesecond compression unit 33, and values A and B of two pixels truncatedby the second compression unit 33.

FIG. 10 illustrates an example of a bit stream packet such as generatedby the bit packing unit 36 illustrated in FIG. 3

Referring to FIG. 10, a bit stream packet generated by the bit packingunit 36 illustrated in FIG. 3 typically includes 4 bits of mode data, 2bits of edge mode data, 2 bits of neighbor-mode data, 8 bits ofcompressed values A and B of two pixels corresponding to an R component,wherein 4 bits are assigned to each pixel, 10 bits of compressed valuesA and B of two pixels corresponding to a G component, wherein 5 bits areassigned to each pixel, and 8 bits of compressed values A and B of twopixels corresponding to a B component, wherein 4 bits are assigned toeach pixel. As illustrated in FIG. 10, the bit packing unit 36 mayassign 4 bits to each of compressed values A and B of two pixelscorresponding to each of R and B components, and may assign 5 bits toeach of compressed values A and B of two pixels corresponding to a Gcomponent, thereby generating a total of 34 bits of a bit stream packet.In order to accurately ⅓ compress 96 bits of an original 2×2 block, thatis, in order to generate a total of 32 bits of a bit stream packet, 4bits may be assigned to each of compressed values A and B of two pixelscorresponding to each of R, G, and B components.

FIG. 11 illustrates the image restoring apparatus 23 such as illustratedin FIG. 2.

Referring to FIG. 11, the image restoring apparatus 23 may include, forexample, a bit parser 111, a mode recognition unit 112, a firstrestoring unit 113, a second restoring unit 114, and a merger 115. Inorder to further enhance an image compression rate, the image restoringapparatus 23 may further include different or additional components,such as a decoder for performing entropy-decoding, other than thecomponents illustrated in FIG. 11.

The bit parser 111 may read a bit stream packet from the memory 22 (seeFIG. 2), parse the bit stream packet to extract from the bit streampacket compressed data of a current block and mode data indicating animage compression method among the DPCM method, the PCM method, thetransformation method, and the edge method, which is used by the imagecompression apparatus 21, and may output the compressed data of thecurrent block and the mode data to the mode recognition unit 112.Specifically, if the mode data indicates the edge method, the compresseddata of the current block may include edge mode data indicating one offour edge modes, neighbor mode data indicating one of two neighbormodes, and values A and B of two pixels among four pixels constructingthe current block.

The mode recognition unit 112 may recognize an edge mode, a neighbormode, and a mode corresponding to an image compression method that isused by the image compression apparatus 21, from the mode data extractedby the bit parser 111. The mode recognition unit 112 may output thecompressed data extracted by the bit parser 111 to the first restoringunit 113 if the recognized mode is one of the DPCM method, the PCMmethod, and the transformation method, and may output the compresseddata extracted by the bit parser 11 to the second restoring unit 114 ifthe recognized mode is the edge mode.

If the recognized mode is one of the DPCM method, the PCM method, andthe transformation method, the first restoring unit 113 may restorevalues of the four pixels constructing the current block, using thecompressed data extracted by the bit parser 111, according to therecognized mode. In more detail, if the recognized mode is a mode basedon the DPCM method, the first restoring unit 113 generally shifts thecompressed data extracted by the bit parser 111 by the number of bitscorresponding to the recognized mode in a direction to the left,according to the DPCM method, adds a predetermined binary valuecorresponding to the recognized mode to the result of the shifting,restores differences between values of the four pixels constructing thecurrent block and values of four pixels constructing a reference block,and adds the restored differences to the values of the four pixelsconstructing the reference block, thereby restoring the values of thefour pixels constructing the current block. If the recognized modeindicates the PCM method, the first restoring unit 113 may add apredetermined binary value to the compressed data extracted by the bitparser 111, thereby restoring values of the four pixels constructing thecurrent block. Also, if the recognized mode indicates the transformationmethod, the first restoring unit 113 may perform Inverse Discrete CosineTransformation (IDCT), etc. on the compressed data extracted by the bitparser 111, according to the transformation method, thereby restoringvalues of the four pixels constructing the current block.

The second restoring unit 114 generally extracts compressed values A andB of two pixels of the four pixels constructing the current block, fromthe compressed data extracted by the bit parser 111, adds apredetermined binary value to the compressed values A and B of the twopixels, and predicts values of two pixels positioned at a directionaledge corresponding to the edge mode recognized by the edge moderecognition unit 112, using values of neighboring pixels of the twopixels, thereby restoring values of the four pixels constructing thecurrent block. As described above, in an embodiment, the neighboringpixels may include at least two or more pixels among the pixelsconstructing the current block and pixels constructing the neighboringblocks of the current block, wherein the values of the pixelsconstructing the current block are values restored by the addition ofthe predetermined binary value, as described above. The values of thepixels constructing the neighboring blocks of the current block may bevalues restored according to the image compression methods applied tothe neighboring blocks.

FIG. 12 illustrates the second restoring unit 114 such as illustrated inFIG. 11.

Referring to FIG. 12, the second restoring unit 114 may include, forexample, an edge restoring unit 121, a first edge prediction unit 122, asecond edge prediction unit 123, a third edge prediction unit 124, and afourth edge prediction unit 125. In particular, the first edgeprediction unit 122, the second edge prediction unit 123, the third edgeprediction unit 124, and the fourth edge prediction unit 125 may predictvalues of two pixels of four pixels constructing a current block, likethe first edge prediction unit 51, the second edge prediction unit 52,the third edge prediction unit 53, and the fourth edge prediction unit54 of the image compression apparatus 21 (see e.g. FIG. 5).

The edge restoring unit 121 may extract compressed values A and B of twopixels of four pixels constructing a current block, from compressed dataextracted by the bit parser 111, and may add a predetermined binaryvalue to the compressed values A and B of the two pixels, therebyrestoring values of the two pixels of the four pixels constructing thecurrent block, for each color component of a current image. For example,the edge restoring unit 121 may extract 8 bits of compressed values Aand B, each compressed value having 4 bits corresponding to R componentsof two pixels of four pixels constructing a current block fromcompressed data extracted by the bit parser 111, and may add 4 bits of abinary value to the 4 bits of each compressed value, thereby restoringvalues of the two pixels of the four pixels constructing the currentblock, for each color component of a current image. The edge restoringunit 121 may restore values of two pixels of the four pixelsconstructing the current block by applying the same method as describedabove to G and B component values.

Also, the edge restoring unit 121 may output the restored values of thetwo pixels to one corresponding to an edge mode recognized by the moderecognition unit 112, among the first edge prediction unit 122, thesecond edge prediction unit 123, the third edge prediction unit 125, andthe fourth edge prediction unit 125.

If the edge mode recognized by the mode recognition unit 112 indicates alower-right directional edge, the first edge prediction unit 122 maypredict values of two pixels positioned at the lower-right directionaledge, among the four pixels constructing the current block, using valuesof neighboring pixels of the two pixels. In more detail, the first edgeprediction unit 122 may predict values of pixels positioned at thelower-right directional edge, using an average value of values ofneighboring pixels positioned in one of two areas divided by thelower-right directional edge, and of values of neighboring pixelspositioned in the other of the two areas. This will be described in moredetail with reference to FIG. 6, below.

Referring to FIG. 6, if the edge mode recognized by the mode recognitionunit 112 indicates a lower-right directional edge and a neighbor moderecognized by the mode recognition unit 112 represents neighboringpixels according to the pattern of Equation 1, the first edge predictionunit 122 may predict a value of a current pixel P0, which is the upperpixel of two pixels P0 and P3 positioned at the lower-right directionaledge, using an average value of values of the pixels P1, N1, P2, and N3to the left and right of, and below and above, the current pixel P0,each of which are neighboring pixels of the current pixel P0, accordingto Equation 1, for each color component of a current image.

Also, if the edge mode recognized by the mode recognition unit 112 isthe lower-right directional edge and the neighbor mode recognized by themode recognition unit 112 represents neighboring pixels according to thepattern of Equation 2, the first edge prediction unit 122 may predict avalue of the current pixel P0, which is the upper pixel of the twopixels P0 and P3 positioned at the lower-right directional edge, bysumming a value of the pixel N2 to the upper-left of the current pixelP0, and a gradient value of the pixel P3 to the lower-right of thecurrent pixel P0 with respect to the current pixel P0, according toEquation 2, for each color component of the current image.

Also, if the edge mode recognized by the mode recognition unit 112indicates the lower-right directional edge and the neighbor moderecognized by the mode recognition unit 112 represents neighboringpixels according to the pattern of Equation 3, the first edge predictionunit 122 may predict a value of a current pixel P3, which is the lowerof the two pixels P0 and P3 positioned at the lower-right directionaledge, using an average value of values of the pixel P1 above the currentpixel P3, the pixel P2 to the left of the current pixel P3, the pixel P0to the upper-left of the current pixel P3, the pixel N1 to the left ofthe pixel P0 to the upper-left of the current pixel P3, and the pixel N3above the pixel P0 to the upper-left of the current pixel P3, accordingto Equation 3, for each color component of the current image.

Also, if the edge mode recognized by the mode recognition unit 112indicates the lower-right directional edge and the neighbor moderecognized by the mode recognition unit 112 represents neighboringpixels according to the pattern of Equation 4, the first edge predictionunit 122 may predict a value of the current pixel P3, which is the lowerof the two pixels P0 and P3 positioned at the lower-right directionaledge, by obtaining an average value of values of the pixels P1 and P2above and to the left of the current pixel P3, each of which areneighboring pixels of the current pixel P3, and summing the averagevalue and a gradient value of the pixel P0 to the upper-left of thecurrent pixel P3 with respect to the current pixel P3, according toEquation 4, for each color component of the current image. In anembodiment, since the neighbor mode data is used to predict values oftwo pixels, the neighbor mode data may indicate one of Equations 1 and 2and one of Equations 3 and 4. As a result, the first edge predictionunit 122 may predict values of two pixels of four pixels constructing acurrent block. This may be applied in the same way to the followingembodiments.

If the edge mode recognized by the mode recognition unit 112 indicates alower-left directional edge, the second edge prediction unit 123 maypredict values of two pixels positioned at the lower-left directionaledge among the four pixels constructing the current block, using valuesof neighboring pixels of the two pixels. In more detail, the second edgeprediction unit 123 may predict values of pixels positioned at alower-left directional edge, using an average value of values ofneighboring pixels positioned in one of two areas divided by thelower-left directional edge, and of values of neighboring pixelspositioned in the other of the two areas. The operation will bedescribed in more detail with reference to FIG. 7, below.

If the edge mode recognized by the mode recognition unit 112 indicates alower-left directional edge and a neighbor mode recognized by the moderecognition unit 112 represents neighboring pixels according to thepattern of Equation 5, the second edge prediction unit 123 may predict avalue of a current pixel P1, which is the upper pixel of two pixels P1and P2 positioned at the lower-left directional edge, using an averagevalue of values of the pixels P0 and P3 to the left of and below thecurrent pixel P1, each of which are neighboring pixels of the currentpixel P1, according to Equation 5, for each color component of thecurrent image.

Also, if the edge mode recognized by the mode recognition unit 112indicates the lower-left directional edge and the neighbor moderecognized by the mode recognition unit 112 represents neighboringpixels according to the pattern of Equation 6, the second edgeprediction unit 123 may predict a value of the current pixel P1, whichis the upper pixel of the two pixels P1 and P2 positioned at thelower-left directional edge, using an average value of values of thepixels N4 and P3 above and below the current pixel P1, which correspondto neighboring pixels of the current pixel P1, according to Equation 6,for each color component of a current image. Also, the second edgeprediction unit 123 may select a neighbor mode corresponding toneighboring pixels used to obtain a predicted value of the current pixelP1 having a smaller difference from the actual value of the currentpixel P1 among the predicted values of the current pixel P1, from amongtwo neighbor modes in which two patterns of neighboring pixels arerespectively used, as described above, and may output neighbor mode datacorresponding to the neighbor mode.

Also, if the edge mode recognized by the mode recognition unit 112indicates the lower-left directional edge and the neighbor moderecognized by the mode recognition unit 112 represents neighboringpixels according to the pattern of Equation 7, the second edgeprediction unit 123 may predict a value of a current pixel P2, which isthe lower of the two pixels P1 and P2 positioned at the lower-leftdirectional edge, using an average value of values of the pixels P0 andP3 above and to the right of the current pixel P2, each of which areneighboring pixels of the current pixel P2, according to Equation 7, foreach color component of the current image.

Also, if the edge mode recognized by the mode recognition unit 112indicates the lower-left directional edge and the neighbor moderecognized by the mode recognition unit 112 represents neighboringpixels according to the pattern of Equation 8, the second edgeprediction unit 123 may predict a value of the current pixel P2, whichis the lower of the two pixels P1 and P2 positioned at the lower-leftdirectional edge, using an average value of values of the pixels N0 andP3 to the left and right of the current pixel P2, each of which areneighboring pixels of the current pixel P2, according to Equation 8, foreach color component of the current image.

If the edge mode recognized by the mode recognition unit 112 indicates avertical directional edge, the third edge prediction unit 124 maypredict values of two pixels positioned at the vertical direction edgeamong the four pixels constructing the current block, using values ofneighboring pixels of the two pixels. In more detail, the third edgeprediction unit 124 may predict values of pixels positioned at avertical directional edge, using an average value of values ofneighboring pixels positioned in one of two areas divided by thevertical directional edge, and of values of neighboring pixelspositioned in the other of the two areas. The operation will bedescribed in more detail with reference to FIG. 8.

If the edge mode recognized by the mode recognition unit 112 indicatesthe vertical directional edge and a neighbor mode recognized by the moderecognition unit 112 represents neighboring pixels according to thepattern of Equation 9, the third edge prediction unit 124 may predict avalue of a current pixel P0, which is the upper pixel of two pixels P0and P2 positioned at the vertical directional edge, using an averagevalue of values of the pixels N1 and P1 to the left and right of thecurrent pixel P0, each of which are neighboring pixels of the currentpixel P0, according to Equation 9, for each color component of thecurrent image.

If the edge mode recognized by the mode recognition unit 112 indicatesthe vertical directional edge and the neighbor mode recognized by themode recognition unit 112 represents neighboring pixels according to thepattern of Equation 10, the third edge prediction unit 124 may predict avalue of the current pixel P0, which is the upper pixel of the twopixels P0 and P2 positioned at the vertical directional edge, byobtaining an average value of values of the pixels N1, P1, N3, and P2 tothe left and right of and above and below the current pixel P0, each ofwhich are neighboring pixels of the current pixel P0, and summing theaverage value and a gradient value in a horizontal direction at theupper pixel N3 of the current pixel P0, according to Equation 10, foreach color component of the current image.

Also, if the edge mode recognized by the mode recognition unit 112indicates the vertical directional edge and the neighbor mode recognizedby the mode recognition unit 112 represents neighboring pixels accordingto the pattern of Equation 11, the third edge prediction unit 124 maypredict a value of a current pixel P2, which is the lower of the twopixels P0 and P2 positioned at the vertical directional edge, using anaverage value of values of the pixels N0 and P3 to the left and right ofthe current pixel P2, each of which are neighboring pixels of thecurrent pixel P2, according to Equation 11, for each color component ofthe current image.

Also, if the edge mode recognized by the mode recognition unit 112indicates the vertical directional edge and the neighbor mode recognizedby the mode recognition unit 112 represents neighboring pixels accordingto the pattern of Equation 12, the third edge prediction unit 124 maypredict a value of the current pixel P2, which is the lower of the twopixels P0 and P2 positioned at a vertical directional edge, by obtainingan average value of values of the pixels N0 and P3 to the left and rightof the current pixel P2, each of which are neighboring pixels of thecurrent pixel P2, and summing the average value and a gradient value ina horizontal direction at the pixel N3 above the pixel P0 above thecurrent pixel P2, according to Equation 12, for each color component ofthe current image.

If the edge mode recognized by the mode recognition unit 112 indicates ahorizontal directional edge, the fourth edge prediction unit 125 maypredict values of two pixels positioned at the horizontal direction edgeamong the four pixels constructing the current block, using values ofneighboring pixels of the two pixels. In more detail, the fourth edgeprediction unit 125 may predict values of pixels positioned at thelower-right directional edge, using an average value of values ofneighboring pixels positioned in one of two areas divided by thehorizontal directional edge, and of values of neighboring pixelspositioned in the other of the two areas. This will be described in moredetail with reference to FIG. 9.

If the edge mode recognized by the mode recognition unit 112 indicates ahorizontal directional edge and a neighbor mode recognized by the moderecognition unit 112 represents neighboring pixels according to thepattern of Equation 13, the fourth edge prediction unit 125 may predicta value of a current pixel P0, which is the left-most pixel of the twopixels P0 and P1 positioned at the horizontal directional edge, using anaverage value of values of the pixels N3 and P2 above and below thecurrent pixel P0, each of which are neighboring pixels of the currentpixel P0, according to Equation 13, for each color component of thecurrent image.

Also, if the edge mode recognized by the mode recognition unit 112indicates the horizontal directional edge and the neighbor moderecognized by the mode recognition unit 112 represents neighboringpixels according to the pattern of Equation 14, the fourth edgeprediction unit 125 may predict a value of the current pixel P0, whichis the left-most pixel of the two pixels P0 and P1 positioned at thehorizontal directional edge, by obtaining an average value of values ofthe pixels N3 and P2 above and below the current pixel P0, each of whichare neighboring pixels of the current pixel P0, and summing the averagevalue and a gradient value in a vertical direction at the pixel N1 tothe left of the current pixel P0, according to Equation 13, for eachcolor component of the current image.

Also, if the edge mode recognized by the mode recognition unit 112indicates the horizontal directional edge and the neighbor moderecognized by the mode recognition unit 112 represents neighboringpixels according to the pattern of Equation 15, the fourth edgeprediction unit 125 may predict a value of a current pixel P1, which isthe right-most pixel of the two pixels P0 and P1 positioned at thehorizontal directional edge, using an average value of values of thepixels N4 and P3 above and below the current pixel P1, each of which areneighboring pixels of the current pixel P1, according to Equation 15,for each color component of the current image.

Also, if the edge mode recognized by the mode recognition unit 112indicated the horizontal directional edge and the neighbor moderecognized by the mode recognition unit 112 represents neighboringpixels according to the pattern of Equation 16, the fourth edgeprediction unit 125 may predict a value of the current pixel P1, whichis the right-most pixel of the two pixels P0 and P1 positioned at thehorizontal directional edge, by obtaining an averaging value of valuesof the pixels N4 and P3 above and below the current pixel P1, andsumming the average value and a gradient value in a vertical directionat the pixel N1 to the left of the pixel P0 to the left of the currentpixel P1, according to Equation 4, for each color component of thecurrent image.

FIG. 13 explains a process of truncating and adding 8 bits of a pixelvalue according to the edge method, according to an embodiment of thepresent invention.

Referring to FIGS. 2 and 13, the image compression apparatus 21typically truncates 4 bits from 8 bits of an R component value.Successively, the image restoring apparatus 23 may add a 4-bit value“1000” to the 4 bits of compressed data, thereby restoring the 8 bits ofthe R component value. In an embodiment, a reason for adding the 4-bitvalue “1000” may include the fact that the 4-bit value “1000” is anintermediate value among all possible values that can be represented by4 bits. Likewise, a 3-bit value “100” may be added to a G componentvalue, and the 4-bit value “1000” may be added to a B component value.However, embodiments of the present invention are not limited to this,and different values may be added to R, G, and B component values inorder to improve image compression efficiency and picture quality ofrestored images.

Referring to FIG. 11, the merger 115 may merge 2×2 blocks, each 2×2block having a total of 96 bits and consisting of four 8-bit pixels foreach of R, G, and B components restored by the first restoring unit 113or the second restoring unit 114, thereby reconstructing the currentimage.

FIG. 14 illustrates a pixel value prediction method, according to anembodiment of the present invention.

Referring to FIG. 14, the pixel value prediction method may include, forexample, operations that are sequentially processed by the first edgeprediction unit 51, the second edge prediction unit 52, the third edgeprediction unit 53, and the fourth edge prediction unit 54 asillustrated in FIG. 5, or by the first edge prediction unit 122, thesecond edge prediction unit 123, the third edge prediction unit 124, andthe fourth edge prediction unit 125 as illustrated in FIG. 12.Accordingly, the above descriptions related to the first edge predictionunit 51, the second edge prediction unit 52, the third edge predictionunit 53, and the fourth edge prediction unit 54 as illustrated in FIG.5, and the first edge prediction unit 122, the second edge predictionunit 123, the third edge prediction unit 124, and the fourth edgeprediction unit 125 may also be applied to the pixel value predictionmethod. Alternatively, the pixel value prediction method may equally beperformed by other units not previously described herein. In particular,operations which are processed in common by the edge prediction unitswill be described in more detail, below.

In operation 141, an edge prediction unit may determine pixelspositioned at a directional edge of four directional edges, among fourpixels constructing a 2×2 current block in a current image, for eachcolor component of the current image.

In operation 142, the edge prediction unit may determine neighboringpixels positioned in each of two areas divided by the directional edge,for each color component of the current image. In more detail, inoperation 142, the edge prediction unit may determine neighboring pixelspositioned in one area of two areas divided by the directional edge, andneighboring pixels positioned in the other area of the two areas, foreach color component of the current image.

In operation 143, the edge prediction unit may predict values of thepixels determined in operation 141, using values of the neighboringpixels determined in operation 142. For example, if the directional edgeis a lower-right directional edge, in operation 143, the edge predictionunit may predict a value of a current pixel, which is the upper pixel ofpixels positioned at the lower-right directional edge using an averagevalue of values of the pixels to the left and right of, and below andabove, the current pixel, or by summing a value of the pixel to theupper-left of the current pixel and a gradient value of the pixel to thelower-right of the current pixel.

FIG. 15 illustrates an image compression method, according to anembodiment of the present invention.

Referring to FIGS. 3 and 15, the image compression method may include,for example, operations that are sequentially processed by the imagecompression apparatus 21. Accordingly, the above descriptions related tothe image compression apparatus 21 may also be applied to the imagecompression method. Alternatively, the image compression method mayequally be performed by other image compression apparatuses notpreviously described herein.

In operation 151, the image compression apparatus 21 may receive acurrent image and divide the current image in units of 2×2 blocks.

In operation 152, the image compression apparatus 21 may compress valuesof four pixels constructing a current block divided by the splitter 31(see FIG. 5), according to the DPCM method, the PCM method, and thetransformation method, for example.

In operation 153, the image compression apparatus 21 may predict valuesof two pixels positioned at each of four directional edges, among thefour pixels constructing the current block, using values of neighboringpixels of the two pixels, and may truncate a part of values ofnon-predicted pixels among the four pixels constructing the currentblock, thereby compressing values of the four pixels constructing thecurrent block.

In operation 154, the image compression apparatus 21 may restore valuesof the four pixels constructing the current block, using the datacompressed in operation 152, according to the DPCM method, the PCMmethod, and the transformation method, for example.

In operation 155, the image compression apparatus 21 may extractcompressed values A and B of two pixels from the data compressed inoperation 153, add a predetermined binary value to the compressed valuesA and B of the two pixels, and may predict values of two pixelspositioned at the directional edge using values of neighboring pixels ofthe two pixels positioned at the directional edge, thereby restoringvalues of the four pixels constructing the current block.

In operation 156, the image compression apparatus 21 may calculatedifferences between the values of the four pixels constructing thecurrent block, which values are restored in operations 154 and 155, andactual values of the four pixels constructing the current block dividedin operation 151, and may select a mode indicating an image compressionmethod in which the difference is a minimum, from among a plurality ofmodes corresponding to the DPCM method, the PCM method, thetransformation method, and the edge method, for example.

In operation 157, the image compression apparatus 21 may generate a bitstream packet including mode data indicating the mode selected inoperation 156, and compressed data corresponding to the mode.

In operation 158, the image compression apparatus 21 may determinewhether data of all blocks constructing the current image has beencompletely compressed, and may return to operation 152 if the datacompression is not complete and terminate the process if the datacompression is complete.

FIG. 16 illustrates an image compression method, such as correspondingto operation 153 illustrated in FIG. 15.

Referring to FIG. 16, the image compression method corresponding tooperation 153, such as illustrated in FIG. 15, may include operationswhich are sequentially processed by the second compression unit 33.Accordingly, the above descriptions related to the second compressionunit 33 illustrated in FIG. 5 may also be applied to the imagecompression method.

Referring to FIGS. 6 and 16, in operation 161, the second compressionunit 33 may predict a value of a current pixel P0, which is the upperpixel of two pixels P0 and P3 positioned at a lower-right directionaledge, using an average value of values of the pixels P1, N1, P2, and N3to the right and left of, and below and above, the current pixel P0,each of which are neighboring pixels of the current pixel P0, accordingto Equation 1, for each color component of a current image.

In operation 162, the second compression unit 33 may predict a value ofthe current pixel P0, which is the upper pixel of the two pixels P0 andP3 at the lower-right directional edge, by summing a value of the pixelN2 to the upper left of the current pixel P0 and a gradient value of thepixel P3 to the lower-right of the current pixel P0 with respect to thecurrent pixel P0, according to Equation 2, for each color component ofthe current image.

In operation 163, the second compression unit 33 may select a neighbormode corresponding to neighboring pixels used to obtain a predictedvalue of the current pixel P0 having a smaller difference from theactual value of the current pixel P0 among the predicted values of thecurrent pixel P0, from among two neighbor modes (corresponding toEquations 1 and 2) in which two patterns of neighboring pixels arerespectively used, as described above.

In operation 164, the second compression unit 33 may predict a value ofa current pixel P3, which is the lower of the two pixels P0 and P3positioned at the lower-right directional edge, using an average valueof values of the pixel P1 above the current pixel P3, the left pixel P2of the current pixel P3, the pixel P0 to the upper-left of the currentpixel P3, and the pixel N3 above the pixel P0 to the upper-left of thecurrent pixel P3, each of which are neighboring pixels of the currentpixel P3, according to Equation 3, for each color component of thecurrent image.

In operation 165, the second compression unit 33 may predict a value ofthe current pixel P3, which is the lower of the two pixels P0 and P3positioned at the lower-right directional edge, by obtaining an averagevalue of the pixels P1 and P2 above and to the left of the current pixelP3, each of which are neighboring pixels of the current pixel P3, andsumming the average value and a gradient value of the pixel P0 to theupper-left of the current pixel P3 with respect to the current pixel P3,according to Equation 4, for each color component of the current image.

In operation 166, the second compression unit 33 may select a neighbormode corresponding to neighboring pixels used to obtain a predictedvalue of the current pixel P3 having a smaller difference from theactual value of the current pixel P3 among the predicted values of thecurrent pixel P3, from among two neighbor modes (corresponding toEquations 3 and 4) in which two patterns of neighboring pixels arerespectively used, as described above.

In operation 167, the second compression unit 33 may select an edge modeindicating a directional edge in which a sum of differences between thepredicted values of the four pixels and actual values of the four pixelsis a minimum among the values predicted in operations 161 through 164and values predicted with respect to the remaining three directionaledges except for the lower-right directional edge. Edge predictionmethods for the remaining three directional edges other than thelower-right directional edge have not been described in detail. However,it may be understood by one of ordinary skill in the art that the edgeprediction methods for the remaining three directional edges can besufficiently implemented from the above descriptions and are processedconcurrently with the operations 161 through 165.

In operation 167, the second compression unit 33 may output edge modedata indicating the edge mode and neighbor mode data representing aneighbor mode corresponding to the edge mode, instead of predictedvalues of two pixels corresponding to the edge mode selected inoperation 166, thereby compressing values of the four pixelsconstructing the current block.

FIG. 17 illustrates an image restoring method, according to anembodiment of the present invention.

Referring to FIG. 17, the image restoring method may include, forexample, operations that are sequentially processed by the imagerestoring apparatus 23 such as illustrated in FIG. 3. The abovedescriptions related to the image restoring apparatus 23 illustrated inFIG. 3 may also be applied to the image compression method.Alternatively, the image restoring method may equally be performed byother image restoring apparatuses not previously described herein.

Referring to FIGS. 2 and 17, in operation 171, the image restoringapparatus 23 may read a bit stream packet from the memory 22, parse thebit stream packet, and extract compressed data of a current block andmode data indicating an image compression method used by the imagecompression apparatus 21, among a variety of image compression methods,from the bit stream packet.

In operation 172, the image restoring apparatus 23 may recognize a modeindicating an image compression method used by the image compressionapparatus 21, among a variety of image compression methods, an edgemode, and a neighbor mode, from the mode data extracted in operation171. If the recognized mode indicates one of the DPCM method, the PCMmethod, and the transformation method, the process proceeds to operation173, and if the recognized mode indicates the edge mode, the processproceeds to operation 174.

In operation 173, the image restoring apparatus 23 may restore values ofthe four pixels constructing the current block using the compressed dataextracted in operation 171, according to the corresponding method amongthe DPCM method, the PCM method, and the transformation method, forexample.

In operation 174, the image restoring apparatus 23 may extractcompressed values A and B of two pixels of the four pixels constructingthe current block, from the compressed data extracted in operation 171,add a predetermined binary value to the compressed values A and B of thetwo pixels, and may predict values of two pixels positioned at adirectional edge corresponding to the edge mode recognized in operation172 using values of neighboring pixels of the two pixels, therebyrestoring values of the four pixels constructing the current block.

In operation 175, the image restoring apparatus 23 may determine whetherdata of all blocks constructing the current image has been completelyrestored, and may return to operation 171 if the data restoration is notcomplete, and proceed to operation 176 if the data restoration iscomplete.

In operation 176, the image restoring apparatus 23 may merge 2×2 blocks,each 2×2 block having a total of 96 bits and consisting of four 8-bitpixels for each of R, G, and B components restored in operation 173 or174, thereby reconstructing the current image.

FIG. 18 illustrates an image restoring method such corresponding tooperation 174 illustrated in FIG. 17.

Referring to FIG. 18, the image restoring method corresponding tooperation 174 illustrated in FIG. 17 may include operations that aresequentially processed by the second restoring unit 114 illustrated inoperation 17. Accordingly, the above descriptions related to the secondrestoring unit 114 will also be applied to the image restoring method.

In operation 181, the second restoring unit 114 may extract compressedvalues A and B of two pixels among four pixels constructing a currentblock, from compressed data extracted by the bit parser 111 (see FIG.11), for each color component of the current image.

In operation 181, the second restoring unit 114 may add a predeterminedbinary value to the compressed values A and B of the two pixelsextracted in operation 181, thereby restoring values of the two pixelsof the four pixels constructing the current block.

In operation 182, if an edge mode recognized by the mode recognitionunit 112 indicates a lower-right directional edge, the second restoringunit 114 proceeds to operation 183, and if the edge mode indicates adifferent directional edge, the second restoring unit 114 proceeds tooperation 189.

In operation 183, the second restoring unit 114 proceeds to operation184 if a neighbor mode recognized by the mode recognition unit 112represents neighboring pixels according to the pattern of Equation 1with respect to a current pixel P0, which is the upper pixel of twopixels P0 and P3 (see FIG. 6), and proceeds to operation 185 if theneighbor mode represents neighboring pixels according to the pattern ofEquation 2.

In operation 184, referring to FIG. 6, the second restoring unit 114 maypredict a value of a current pixel P0, which is the upper pixel of twopixels P0 and P3 positioned at a lower-right directional edge, using anaverage value of values of the pixels P1, N1, P2, and N3 to the left andright of, and below and above, the current pixel P0, each of which areneighboring pixels of the current pixel P0, according to Equation 1, foreach color component of the current image.

In operation 185, the second restoring unit 114 may predict a value ofthe current pixel P0, which is the upper pixel of the two pixels P0 andP3 positioned at the lower-right directional edge, by summing a value ofthe pixel N2 to the upper left of the current pixel P0 and a gradientvalue of the pixel P3 to the lower-right of the current pixel P0 withrespect to the current pixel P0, according to Equation 2, for each colorcomponent of the current image.

In operation 186, the second restoring unit 114 proceeds to operation187 if the neighbor mode recognized by the mode recognition unit 112,with respect to a current pixel P3, which is the lower of the two pixelsP0 and P3, represents neighboring pixels according to the pattern ofEquation 3, and proceeds to operation 188 if the neighbor mode withrespect to the current pixel P3 represents neighboring pixels accordingto the pattern of Equation 4.

In operation 187, the second restoring unit 114 may predict a value ofthe current pixel P3, which is the lower of the two pixels P0 and P3positioned at the lower-right directional edge, using an average valueof values of the pixel P1 above the current pixel P3, the pixel P2 tothe left of the current pixel P3, the left pixel N1 of the upper-leftpixel P0 of the current pixel P3, and the pixel N3 above the upper-leftpixel P0 of the current pixel P3, each of which are neighboring pixelsof the current pixel P3, according to Equation 3, for each colorcomponent of the current image.

In operation 188, the second restoring unit 114 may predict a value ofthe current pixel P3, which is the lower of the two pixels P0 and P3positioned at the lower-right directional edge, by obtaining an averagevalue of values of the pixels P1 and P2 above and to the left of thecurrent pixel P3, each of which are neighboring pixels of the currentpixel P3, and summing the average value and a gradient value of theupper-left pixel P0 of the current pixel P3 with respect to the currentpixel P3, according to Equation 4, for each color component of thecurrent image.

In operation 189, the second restoring unit 114 may process differentdirectional edges other than the lower-right directional edge, in thesame way as the processing (as exemplified by operations 183 through188) of the lower-right directional edge. Accordingly, more detaileddescription of the processing of the different directional edges will beomitted.

In addition to the above described embodiments, embodiments of thepresent invention can also be implemented through computer readablecode/instructions in/on a medium, e.g., a computer readable medium, tocontrol at least one processing element to implement any above describedembodiment. The medium can correspond to any medium/media permitting thestoring and/or transmission of the computer readable code.

The computer readable code can be recorded/transferred on a medium in avariety of ways, with examples of the medium including recording media,such as magnetic storage media (e.g., ROM, floppy disks, hard disks,etc.) and optical recording media (e.g., CD-ROMs, or DVDs), andtransmission media such as media carrying or including carrier waves, aswell as elements of the Internet, for example. Thus, the medium may besuch a defined and measurable structure including or carrying a signalor information, such as a device carrying a bitstream, for example,according to embodiments of the present invention. The media may also bea distributed network, so that the computer readable code isstored/transferred and executed in a distributed fashion. Still further,as only an example, the processing element could include a processor ora computer processor, and processing elements may be distributed and/orincluded in a single device.

As described above, according to one or more embodiments of the presentinvention, by predicting values of pixels positioned at each directionaledge among pixels constructing a 2×2 block in a current image, usingvalues of neighboring pixels of the pixels, selecting an edge modeindicating a directional edge in which the difference between thepredicted values and actual values of the pixels is a minimum, andoutputting edge mode data indicating the edge mode instead of thepredicted values corresponding to the edge mode, it is possible toeffectively compress edge areas in which little similarity existsbetween pixel values and accordingly improve a compression rate of edgeareas.

Also, according to one or more embodiments of the present invention, byrecognizing an edge mode among a plurality of edge modes, and predictingvalues of pixels positioned at a directional edge corresponding to therecognized mode, among pixels constructing a block having apredetermined size in a current image, using values of neighboringpixels of the pixels, it is possible to effectively restore edge areas,and accordingly improve the picture quality of restored edge areas.

Furthermore, according to one or more embodiments of the presentinvention, by compressing values of pixels constructing a 2×2 block in acurrent image according to a variety of image compression methods,selecting a mode indicating one of the variety of image compressionmethods, and generating a bit stream packet including compressed datacorresponding to the mode, it is possible to effectively compress avariety of images as well as edge areas. Also, according to the presentinvention, by extracting mode data and compressed data of a 2×2 block ina current image from a bit stream packet, recognizing a moderepresenting one of a plurality of image compression methods from themode data, and restoring pixel values using the compressed dataaccording to an image compression method indicated by the recognizedmode, it is possible to effectively restore a variety of images as wellas edge areas.

Although a few embodiments have been shown and described, it would beappreciated by those skilled in the art that changes may be made inthese embodiments without departing from the principles and spirit ofthe invention, the scope of which is defined in the claims and theirequivalents.

1. A pixel value prediction method comprising: (a) determining pixelspositioned at a predetermined directional edge, among pixelsconstructing a block having a predetermined size in a current image; (b)determining neighbor pixels positioned in each of two areas divided bythe predetermined directional edge; and (c) predicting values of thepixels positioned at the predetermined directional edge, using values ofthe determined neighbor pixels.
 2. The pixel value prediction method ofclaim 1, wherein the neighbor pixels are at least two pixels, among thepixels constructing the block and pixels constructing a neighbor blockof the block.
 3. The pixel value prediction method of claim 1, whereinoperation (b) comprises determining neighbor pixels positioned in onearea of the two areas divided by the predetermined directional edge andneighbor pixels positioned in the other area of the two areas.
 4. Thepixel value prediction method of claim 2, wherein operation (a)comprises predicting values of the plurality of pixels positioned at thepredetermined directional edge, using an average value of values ofneighbor pixels positioned in one area of the two areas divided by thepredetermined directional edge and of values of neighbor pixelspositioned in the other area of the two areas.
 5. An image compressionmethod comprising: (a) predicting values of pixels positioned at apredetermined directional edge among pixels constructing a block havinga predetermined size in a current image, using values of neighbor pixelsof the pixels positioned at the predetermined directional edge; (b)repeating operation (a) with respect to each remaining directional edgeexcept for the predetermined directional edge, among a plurality ofdirectional edges; (c) selecting an edge mode in which the differencebetween the values predicted in operations (a) and (b) and actual valuesof the pixels positioned at the predetermined directional edge is aminimum; (d) outputting edge mode data indicating the selected edgemode, instead of the predicted values corresponding to the selected edgemode, thereby compressing the values of the pixels positioned at thepredetermined directional edge.
 6. The image compression method of claim5, wherein operation (a) comprises predicting a value of a current pixelwhich is the upper pixel of two pixels positioned at a lower-rightdirectional edge, using an average value of values of pixels to theright and left of and above and below the current pixel, whichcorresponds to neighbor pixels of the current pixel.
 7. The imagecompression method of claim 6, wherein operation (a) comprisespredicting the value of the current pixel which is the upper pixel ofthe two pixels positioned at the lower-right directional edge, bysumming a value of a upper-left pixel of the current pixel and a valuegradient from the current pixel to a lower-right pixel of the currentpixel.
 8. The image compression method of claim 7, wherein operation (a)further comprises selecting a neighbor mode corresponding to neighborpixels used to obtain a predicted value of the current pixel having asmaller difference from the actual value of the current pixel amongpredicted values of the current pixel, from among two neighbor modes inwhich two patterns of neighbor pixels are respectively applied.
 9. Animage compression method comprising: (a) compressing values of pixelsconstructing a block having a predetermined size in a current image,according to a plurality of predetermined image compression methods; (b)predicting values of pixels positioned at a predetermined directionaledge, among the pixels constructing the block, using values of neighborpixels of the pixels positioned at the predetermined directional edge,thereby compressing the values of the pixels positioned at thepredetermined directional edge; (c) selecting a mode from among aplurality of modes corresponding to the plurality of predetermined imagecompression methods and an image compression method used in operation(b), on the basis of the results compressed in operations (a) and (b);and (d) generating a bit stream packet including mode data indicatingthe selected mode and compressed data corresponding to the selectedmode.
 10. The image compression method of claim 9, further comprisingrestoring the values of the pixels constructing the block, using theresults compressed in operations (a) and (b), wherein operation (c)comprises calculating differences between values of the restored pixelsand actual values of the pixels constructing the block, and selecting amode indicating an image compression method in which a sum of thedifferences is a minimum.
 11. An image restoring method comprising: (a)recognizing an edge mode among a plurality of edge modes; and (b)predicting values of pixels positioned at a predetermined directionaledge corresponding to the recognized edge mode, among pixelsconstructing a block having a predetermined size in a current image,using values of neighbor pixels of the pixels positioned at thepredetermined directional edge.
 12. The image restoring method of claim11, wherein the neighbor pixels are at least two pixels, among thepixels constructing the block and pixels constructing a neighbor blockof the block.
 13. The image restoring method of claim 11, whereinoperation (a) comprises predicting values of the plurality of pixelspositioned at the predetermined directional edge, using values of aplurality of neighbor pixels positioned in each of two areas divided bythe predetermined directional edge.
 14. The image restoring method ofclaim 11, further comprising extracting a compressed value ofpredetermined pixels of the pixels constructing the block, fromcompressed data of the block, and adding a predetermined binary value tothe compressed value of the predetermined pixel, thereby restoring avalue of the predetermined pixel, wherein the neighbor pixels comprisethe restored value of the predetermined pixel.
 15. An image restoringmethod comprising: (a) extracting mode data and compressed data of ablock having a predetermined size in a current image, from a bit streampacket; (b) recognizing a mode corresponding to an image compressionmethod of a plurality of image compression methods, from the mode data;and (c) predicting values of pixels positioned at a directional edgeindicated by the recognized mode, among pixels constructing the block,using values of neighbor pixels of the pixels positioned at thedirectional edge, according to the recognized mode, thereby restoringthe values of the pixels positioned at the directional edge.
 16. Theimage restoring method of claim 15, further comprising restoring thevalues of the pixels positioned at the directional edge, using thecompressed data of the block, if the recognized mode corresponds to animage compression method of a plurality of predetermined imagecompression methods, wherein operation (c) comprises restoring thevalues of the pixels positioned at the directional edge using adifferent image compression method if the recognized mode corresponds tothe different image compression method except for the predeterminedimage compression methods.